package com.hobart.learning.lagou.edu.IPersistence.sqlSession;

import com.hobart.learning.lagou.edu.IPersistence.pojo.Configuration;
import com.hobart.learning.lagou.edu.IPersistence.pojo.MappedStatement;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

public interface Executor {
    <E> List<E> query(Configuration configuration, MappedStatement mappedStatement, Object... param) throws SQLException, NoSuchFieldException, ClassNotFoundException, IllegalAccessException, IntrospectionException, InstantiationException, InvocationTargetException;

    int insert(Configuration configuration, MappedStatement mappedStatement, Object[] params) throws SQLException, NoSuchFieldException, ClassNotFoundException, IllegalAccessException, IntrospectionException, InstantiationException, InvocationTargetException;

    int update(Configuration configuration, MappedStatement mappedStatement, Object[] params) throws SQLException, NoSuchFieldException, ClassNotFoundException, IllegalAccessException, IntrospectionException, InstantiationException, InvocationTargetException;

    int delete(Configuration configuration, MappedStatement mappedStatement, Object[] params) throws SQLException, NoSuchFieldException, ClassNotFoundException, IllegalAccessException, IntrospectionException, InstantiationException, InvocationTargetException;
}
